package springs;

import forces.Force;
import masses.Mass;


/**
 * @author Jenni Mercado
 * @author Zach Michaelov
 */

public class Bar extends AbstractSpring {

    /**
     * high k constant to represent a "very stiff" spring
     */
    private static final double MY_STIFF_K_CONSTANT = 5;

    /**
     * @param start start Mass of the Bar
     * @param end end Mass of the Bar
     * @param length length of the Bar
     */
    public Bar (Mass start, Mass end, double length) {
        super(start, end, length, MY_STIFF_K_CONSTANT);

        // setting the real length of the sprint to the distance
        double realLength = Force.distanceBetween(start.getCenter(),
                end.getCenter());
        this.setMyLength(realLength);
    }

    @Override
    public void applyDrivingForce (double dt) {
        // do nothing
    }
}
